<template>
  <div class="home">
    <div class="hero">
      <h1>欢迎来到首页</h1>
      <p>这是一个使用Vue 3 + TypeScript + Vue Router的示例应用</p>
      <div class="nav-buttons">
        <router-link to="/login" class="btn btn-primary">登录</router-link>
        <router-link to="/register" class="btn btn-secondary">注册</router-link>
      </div>
    </div>
    
    <div class="features">
      <div class="feature-card">
        <h3>🚀 Vue 3</h3>
        <p>使用最新的Vue 3 Composition API</p>
      </div>
      <div class="feature-card">
        <h3>📝 TypeScript</h3>
        <p>完整的TypeScript支持</p>
      </div>
      <div class="feature-card">
        <h3>🛣️ Vue Router</h3>
        <p>单页面应用路由管理</p>
      </div>
      <div class="feature-card">
        <h3>🔒 SRI支持</h3>
        <p>子资源完整性保护</p>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
// Home页面逻辑
</script>

<style scoped>
.home {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  margin-bottom: 4rem;
}

.hero h1 {
  font-size: 3rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: #7f8c8d;
  margin-bottom: 2rem;
}

.nav-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.feature-card p {
  color: #7f8c8d;
}
</style>